home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 9 code / Tracks / makefile < prev    next >
Encoding:
Makefile  |  1992-11-16  |  3.3 KB  |  132 lines  |  [TEXT/MPS ]

  1. INITOBJECTS =     init.c.o ∂
  2.                 ShowINIT.a.o 
  3.                 
  4.                 
  5. CDEVOBJECTS =     cdev.cp.o 
  6.  
  7. # DriverGlue must be first for linker.
  8.  
  9. DRVROBJECTS =     DriverGlue.a.o    ∂
  10.                 drvr.c.o ∂
  11.                 drvr.a.o
  12.  
  13.  
  14. DUMPOBJECTS = DumpTracks.c.o
  15.  
  16.  
  17. # Specify any options you want to pass to the compiler(s).  -b tells the compiler to
  18. # put strings in with the current segment, and not in the global data segment.
  19.  
  20. CPlusOptions = -b -mf
  21. COptions = -r -b 
  22.  
  23. #
  24. # Finally, the entire file consists of the DRVR, the INIT, and the CDEV.  
  25. # These are included by tracks.r, which simply includes the aforementioned resources...
  26. #
  27.  
  28.  
  29.  
  30. Tracks ƒƒ makefile Init.rsrc drvr.rsrc cdev.rsrc dumptracks
  31.     rez Tracks.r -o Tracks
  32.     SetFile Tracks -c BNNY -t cdev -a B
  33.     duplicate Tracks "{systemfolder}control panels:"Tracks -y
  34.  
  35.  
  36.  
  37. #
  38. ##################### Compile the CDEV #####################
  39. #
  40.  
  41. cdev.cp.o    ƒ  makefile ∂
  42.                 cdev.cp ∂
  43.                 cdev.h ∂
  44.                 Tracks.h ∂
  45.                 TraceModule.h ∂
  46.                 TracksSaveLoad.h
  47.                 
  48. #
  49.     CPlus    {CPlusOptions} cdev.cp    -o cdev.cp.o
  50.  
  51.      
  52. #
  53. ##################### Compile the INIT #####################
  54. #
  55. ShowINIT.a.o     ƒ     ShowINIT.a makefile 
  56.     asm ShowINIT.a    -o ShowINIT.a.o
  57. init.c.o    ƒ     init.c TracksSaveLoad.h TraceModule.h 
  58.     C {COptions} init.c    -o init.c.o
  59.  
  60.  
  61.     
  62.     
  63. #
  64. ##################### Compile the DRVR #####################
  65. #
  66.  
  67. drvr.c.o    ƒ     makefile ∂
  68.                 drvr.c ∂
  69.                 TraceModule.h ∂
  70.                 Tracks.h
  71.     C {COptions} drvr.c    -o drvr.c.o
  72.  
  73. # Compile the assembly glue object.  Usual dependencies
  74. DriverGlue.a.o ƒ DriverGlue.a DriverGlue.incl.a
  75.     asm -case obj DriverGlue.a
  76.     
  77. #
  78. #
  79. # Link everything for the driver together.  -rt specifies the resource type.  
  80. # In this case, it's 'DRVR' with an ID of 0.  -m specifies which routine in the 
  81. # object files is the first one, so we tell it to look for the first one in the 
  82. # assembly file.  -sn renames the main segment to ".TimDriver".  -ra is pretty 
  83. # self-explanatory, except you have to specify which segment(s) get the resource 
  84. # attributes.  Note the only library I needed for this entire thing was Interface.o.
  85. #
  86. drvr.rsrc ƒƒ makefile {DRVROBJECTS}
  87.     Link -sg .TRACE -rt DRVR=0 -m HEADERDEF  -c 'RSED' -t 'rsrc' ∂
  88.         -ra ".TRACE"=resSysHeap,resLocked,resPreLoad ∂
  89.         {DRVROBJECTS} ∂
  90.         "{Libraries}Interface.o" ∂
  91.         -o drvr.rsrc
  92.         
  93. #    
  94. # Link everything for the INIT together.  Not much here.  Much of the same options get
  95. # passed to the INIT linking as to the DRVR linking.  Again, only Interface.o needed.
  96.  
  97. Init.rsrc ƒƒ makefile {INITOBJECTS} init.r init.h
  98.     Link -rt INIT=1 -m INITMAIN -sg INITMAIN -sn "Main=Install Tracks" ∂
  99.     -c 'RSED' -t 'rsrc' ∂
  100.         -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
  101.         {INITOBJECTS} ∂
  102.         "{Libraries}"Interface.o ∂
  103.         -o Init.rsrc
  104.     rez init.r -a -o init.rsrc
  105.  
  106. #        
  107. # Link everything for the CDEV together. 
  108. #
  109. cdev.rsrc ƒƒ makefile {CDEVOBJECTS} cdev.r cdev.h
  110.     Link -m CDEVMAIN -rt cdev=-4064 -c 'RSED' -t 'rsrc' ∂
  111.         -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
  112.         {CDEVOBJECTS} ∂
  113.         "{Libraries}"Interface.o ∂
  114.         #"{Libraries}Runtime.o" ∂
  115.         -o cdev.rsrc
  116.     rez cdev.r -a -o cdev.rsrc
  117. #
  118. #    Dumptracks:  The MPW Tool used to view Tracks Data
  119. #
  120. dumptracks ƒƒ makefile {DUMPOBJECTS} dumptracks.h
  121.     Link -d -c 'MPS ' -t MPST ∂
  122.         {DUMPOBJECTS} ∂
  123.         "{CLibraries}"StdClib.o ∂
  124.         "{Libraries}"Stubs.o ∂
  125.         "{Libraries}"Runtime.o ∂
  126.         "{Libraries}"Interface.o ∂
  127.         -o DumpTracks
  128.     duplicate DumpTracks {MPW}Tools:DumpTracks -y
  129.  
  130. dumptracks.c.o ƒ makefile dumptracks.c
  131.      C -r  dumptracks.c
  132.